<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
	
	
class Cashier Extends MY_Controller
{
	var $current_user;
	private $payment_record_id;
	public function __construct()
	{
		parent::__construct();
		$this->page_auth->secure_page('cashier');
	}
		
	public function index()
	{	
		$this->view_data['system_message'] = $this->_msg();
	}
	
	function changepass($id='')
	{
		$old_pass 	= $this->input->post('old_password');
		$new_pass 	= $this->input->post('new_password');
		$c_new_pass = $this->input->post('c_new_password');
		$user_id = $this->input->post('id');
		$this->view_data['id'] = $id;
		if($this->form_validation->run('user_change_pass') == FALSE){
			
		}else
		{	
			if($this->M_users->verify_password($old_pass,$id)== TRUE){
				if($this->M_users->change_pass($new_pass,$id) == TRUE){
					$this->view_data['system_message'] = 'Password change successfull';
				}else{
					$this->view_data['system_message'] = 'Unable to update password';
				}
			}else{
				$this->view_data['system_message'] = 'Wrong Password Old Password';
			}
		}
	}
	
	
}